#include "addclient.h"
#include "ui_addclient.h"
#include "qsqlquery.h"
AddClient::AddClient(QWidget *parent) :
    QDialog(parent),
    ui(new Ui::AddClient)
{

    ui->setupUi(this);

}
AddClient::AddClient(QSqlDatabase* db)
{
    ptrDb = db;


}

AddClient::~AddClient()
{
    delete ui;
}

void AddClient::on_buttonBox_accepted()
{    
    clientInformation["PREFIX"] = ui->prefix->text();
    clientInformation["ORGNAME"] = ui->orgName->text();
    clientInformation["INN"] = ui->inn->text();
    clientInformation["KPP"] = ui->cpp->text();
    clientInformation["OGRN"] = ui->ogrn->text();
    clientInformation["JURADDRESS"] = ui->jurAdd->toPlainText();
    clientInformation["POSTADDRESS"] = ui->postAdd->toPlainText();
    clientInformation["CURRACCOUNT"] = ui->curAccount->text();
    clientInformation["BANK"] = ui->bank->text();
}

QMap<QString,QString> AddClient::getClientInfo()
{
    return clientInformation;
}
